﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections.Generic;
using CNRS.CCP.DAO;
using CNRS.CCP.Config;
using CNRS.CCP.Connector;


namespace CNRSccpTest
{
	[TestClass]
	public class VootConnector_Test
	{
		ClaimElement grouperElement = null;

		[TestInitialize]
		public void Initailize()
		{
			// build the configuration object
			ClaimsParameters.Instance.CreateParametersInstance();
		}

		[TestMethod]
		public void TestMethod1()
		{
			//Arrange
			// get the Grouper element
			List<ClaimElement> claimsElements = ClaimsParameters.Instance.ClaimsElements;
			grouperElement = claimsElements.Find(item => item.Title == "Grouper");

			//Act
			List<DataElement> res = VootConnector.GetDataElements("Test", grouperElement);

			//Assert
			Assert.IsNotNull(res);
		}
	}
}
